package com.cx.service.wjr.impl;

/**
 * 温家饶
 */

import com.cx.mapper.CourierMapper;
import com.cx.pojo.Courier;
import com.cx.pojo.CourierExample;
import com.cx.service.wjr.AdminCourierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminCourierImpl implements AdminCourierService {

    @Resource
    CourierMapper courierMapper;

    public Courier select(Courier courier) {
        courier.setCourierName("");
        return null;
    }


    public Courier selectByName(Courier courier) {
        return null;
    }

    @Override
    public int update(Courier courier, CourierExample courierExample) {
        return courierMapper.updateByExampleSelective(courier,courierExample);
    }

    @Override
    public int delete(CourierExample courierExample) {
        return courierMapper.deleteByExample(courierExample);
    }

    public int addCourier(Courier courier) {
        return courierMapper.insert(courier);
    }

    public List<Courier> selectByExample(CourierExample courierExample) {
        return courierMapper.selectByExample(courierExample);
    }
}
